import request from '@/utils/request'


//查询图片列表
export function listImage(query) {
  return request({
    //路径与后端的controller中的一致
    url: '/publish/image/list',
    method: 'get',
    params: query
  })
}


//通过栏目id查找文章
export function listArticleByColumn(query) {
  return request({
    //路径与后端的controller中的一致
    url: '/publish/notice/article',
    method: 'get',
    params: query
  })
}
//添加图片新闻
export function addImage(data) {
  return request({
    url: '/publish/image',
    method: 'post',
    data: data
  })
}
//删除图片新闻
//删除栏目通知
export function delImage(imageId) {
  return request({
    url: '/publish/image/' + imageId,
    method: 'delete'
  })
}


export function listArticle(query) {
  return request({
    //路径与后端的controller中的一致
    url: '/publish/image/articles',
    method: 'get',
    params: query
  })
}
